//
//  RemindDetailedViewController.m
//  110
//
//  Created by 段报雪 on 16/4/11.
//  Copyright © 2016年 乔砥. All rights reserved.
//

#import "RemindDetailedViewController.h"

@interface RemindDetailedViewController ()<UITextFieldDelegate>

@property (nonatomic, strong)UIImageView *iconImageView;

@property (nonatomic, strong)UITextField *textField;

@end

@implementation RemindDetailedViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"服药提醒";
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStylePlain target:self action:@selector(rightBarButtonItemAction:)];
    
    _iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(30, KHEIGHT / 12  + 50 , 30, 30)];
    _iconImageView.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:_iconImageView];
    
    _iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(30, KHEIGHT / 12 + 90, 30, 30)];
    _iconImageView.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:_iconImageView];
    
    _iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(30, KHEIGHT / 12 + 130, 30, 30)];
    _iconImageView.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:_iconImageView];
    
    _iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(30, KHEIGHT / 12 + 170, 30, 30)];
    _iconImageView.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:_iconImageView];
    
    _iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(30, KHEIGHT / 12 + 210, 30, 30)];
    _iconImageView.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:_iconImageView];
    
    _iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(30, KHEIGHT / 12 + 250, 30, 30)];
    _iconImageView.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:_iconImageView];
    
    _textField = [[UITextField alloc] initWithFrame:CGRectMake(100, KHEIGHT / 12 + 50, KWIDTH - 50 - 100, 30)];
    _textField.borderStyle = UITextBorderStyleRoundedRect;
    _textField.placeholder = @"服药者称呼";
    _textField.clearButtonMode = UITextFieldViewModeAlways;
    _textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    _textField.returnKeyType = UIReturnKeyNext;
    [self.view addSubview:_textField];
    
    _textField = [[UITextField alloc] initWithFrame:CGRectMake(100, KHEIGHT / 12 + 90, KWIDTH - 50 - 100, 30)];
    _textField.borderStyle = UITextBorderStyleRoundedRect;
    _textField.placeholder = @"药品名称";
    _textField.clearButtonMode = UITextFieldViewModeAlways;
    _textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    [self.view addSubview:_textField];
    
    _textField = [[UITextField alloc] initWithFrame:CGRectMake(100, KHEIGHT / 12 + 130, KWIDTH - 50 - 100, 30)];
    _textField.borderStyle = UITextBorderStyleRoundedRect;
    _textField.placeholder = @"输入备注";
    _textField.clearButtonMode = UITextFieldViewModeAlways;
    _textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    [self.view addSubview:_textField];
    
    _textField = [[UITextField alloc] initWithFrame:CGRectMake(100, KHEIGHT / 12 + 170, KWIDTH - 50 - 100, 30)];
    _textField.borderStyle = UITextBorderStyleRoundedRect;
    _textField.placeholder = @"请选择日期";
    _textField.clearButtonMode = UITextFieldViewModeAlways;
    _textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    _textField.delegate = self;
    [self.view addSubview:_textField];
    
    
    _textField = [[UITextField alloc] initWithFrame:CGRectMake(100, KHEIGHT / 12 + 210, KWIDTH - 50 -100, 30)];
    _textField.borderStyle = UITextBorderStyleRoundedRect;
    _textField.placeholder = @"请选择时间";
    _textField.clearButtonMode = UITextFieldViewModeAlways;
    _textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    [self.view addSubview:_textField];
    
    _textField = [[UITextField alloc] initWithFrame:CGRectMake(100, KHEIGHT / 12 + 250, KWIDTH - 50 -100, 30)];
    _textField.borderStyle = UITextBorderStyleRoundedRect;
    _textField.placeholder = @"是否重复";
    _textField.clearButtonMode = UITextFieldViewModeAlways;
    _textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    [self.view addSubview:_textField];
    
}

- (void)rightBarButtonItemAction:(UIBarButtonItem *)sender
{
    NSLog(@"1");
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [textField resignFirstResponder];
    return YES;
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.textField resignFirstResponder];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
